<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>付款成功页面</title>
<link rel="stylesheet"  type="text/css" href="../AmazeUI-2.4.2/assets/css/amazeui.css"/>
<link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
<link href="../basic/css/demo.css" rel="stylesheet" type="text/css" />

		<link href="../css/sustyle.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../js/vue2.5.js" ></script>
		<script type="text/javascript" src="../js/axios.min.js" ></script>
		<script type="text/javascript" src="../js/jquery-1.11.2.min.js" ></script>
		<script type="text/javascript" src="../js/global.js" ></script>
		<script type="text/javascript" src="../js/bootstrap/js/bootstrap.js" ></script>
		<script type="text/javascript" src="../js/layer/layer.js" ></script>
		<script src="../js/param.js"></script>
		<script src="../js/jquery-1.11.2.min.js"></script>
		<script type="text/javascript" src="../basic/js/jquery-1.7.min.js"></script>

</head>

<body>



<div class="clear"></div>



<div class="take-delivery container">
 <div class="status">
   <h2>您已成功付款</h2>
   <div class="successInfo">
     <ul>
       <li >付款金额<em> ¥{{getTotalPrice()+10}}.00 </em></li>
       <div class="user-info">
         <p>收货人：{{adress.uname}}</p>
         <p>联系电话：{{adress.phone}}</p>
         <p>收货地址：{{adress.adress}}</p>
       </div>
             请认真核对您的收货信息，如有错误请联系客服
                               
     </ul>
     <div class="option">
       <span class="info">您可以</span>
        <a href="../person/order.html" class="J_MakePoint">查看<span>已买到的宝贝</span></a>
        <a href="javascript:;" @click="toOrderInfo()" class="J_MakePoint">查看<span>交易详情</span></a>
     </div>
    </div>
  </div>
</div>


	<div class="footer" >
		 <div class="footer-hd">
			 <p>
			
				 <b>|</b>
				 <a href="#">商城首页</a>
				 <b>|</b>
				 <a href="#">支付宝</a>
				 <b>|</b>
				 <a href="#">物流</a>
				 </p>
				 </div>
				 <div class="footer-bd">
				 <p>
				
				 <a href="#">合作伙伴</a>
				 <a href="#">联系我们</a>
				 <a href="#">网站地图</a>
				 <em>© 2015-2025 XXXX<a href="http://www.cssmoban.com/" target="_blank" title="模板之家"></a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></em>
			 </p>
		 </div>
	</div>
	<script>
	var orid = getParam('orid');
	var uid = localStorage.getItem('id');
	var vue = new Vue({
		el:'.container',
		data:{
			order:{},
			orderData:[],
			baseUrl:baseUrl,
			adress:{
				uname:localStorage.getItem("uname"),
				phone:localStorage.getItem("phone"),
				adress:localStorage.getItem("adress"),
				
			}
		},methods:{
			query:function(){
				//查询订单
				axios.get(baseUrl + '/order/getByorid',{
					params:{
						orid:orid
					}
				})
					.then(function(response) {
						this.orderData = response.data;
					}.bind(this))
					.catch(function(error) {
						layer.msg('请求失败');
					});
			},//返回订单总金额
			getTotalPrice: function() {
				var totalPrice = 0;
				//遍历订单数组数据
				this.orderData.forEach(function(order) {

					totalPrice += parseInt(order.qty) * order.goods.gprice;

				});
				
				return totalPrice;
			},
			toOrderInfo:function(){
				location.href="../person/orderinfo.html?orid="+orid+"&ostate=待发货";
			}
		},
		mounted:function(){
			this.query();
			
		}	
	});
	</script>

</body>
</html>
